import { Module } from '@nestjs/common'
import { RedisModule, RedisModuleOptions} from 'nestjs-redis'
import { AppController } from './app.controller'
import { AppService } from './app.service'
import { DbModule } from './db/db.module'
import { UserModule } from './module/user/user.module'
import { Log4jsModule } from '@nestx-log4js/core'
import { AuthModule } from './auth/auth.module';
import { ProjectModule } from './module/project/project.module';

const redisOptions: RedisModuleOptions = {
  port: 6379,
  name: 'management',
  host: '127.0.0.1',
  password: '123456'
}

@Module({
  imports: [
    RedisModule.register(redisOptions),
    DbModule, 
    UserModule,
    Log4jsModule.forRoot(),
    AuthModule,
    ProjectModule
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
